<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>列表</title>
<link rel="stylesheet" href="/static/layui/css/layui.css" media="all">
<link rel="stylesheet" href="/static/zTree/css/zTreeStyle/zTreeStyle.css" type="text/css">
<script src="/static/layui/layui.all.js"></script>
<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript" src="/static/zTree/js/jquery.ztree.core.js"></script>
<script type="text/javascript" src="/static/zTree/js/jquery.ztree.excheck.js"></script>
<script src="/static/js/webutil.js?t=123"></script>
<style type="text/css">
.t_lable{text-align:right;background-color: #F8F8F8}
.t_content{text-align:left}
</style>
</head>
<body>
<div class="layui-fluid">
	<div class="layui-row">
		<form class="layui-form" id="table_form" action="">
		<table class="layui-table" lay-size="sm">
		  <colgroup>
		    <col width="15%">
		    <col width="35%">
		    <col width="15%">
		    <col width="35%">
		  </colgroup>
		  <tbody>
		  	<input type="hidden" name="tableName" value="${table.javaName?uncap_first}">
			<tr>
		  	  <td class="t_lable">父级菜单：</td>
		      <td class="t_content">
		      	<input type="hidden" name="pid" id="parentMenuId">
		      	<input type="text" readonly name="parentMenuName" id="parentMenuName" value="" class="layui-input" onclick="selectParentMenu();" lay-verify="required">
		      </td>
		      <td class="t_lable">模块名称：</td>
		      <td class="t_content">
		      	<input type="text" name="module" value="" class="layui-input" lay-verify="required">
		      </td>
		  	</tr>
		  	<tr>
		  		<td class="t_lable">菜单名称</td>
		      <td class="t_content">
		      	<input type="text" name="name" value="${table.remarks!''}" class="layui-input" lay-verify="required">
		      </td>
		      
		  	  <td class="t_lable">图标：</td>
		      <td class="t_content">
		      
		      	<input type="hidden" id="menu_icon_hidden" name="icon" value="" class="layui-input">
				<button class="layui-btn  layui-btn-primary" type="button"><i class="layui-icon" id="menu_icon"></i></button>
				<button class="layui-btn" type="button" onclick="selectIcon('menu_icon')">选择图标</button>
				      	
		      </td>
		  	</tr>
		  	<tr>
		  	<td class="t_lable">权限</td>
		      <td class="t_content">
		      	<input type="text" name="permission" value="${table.javaName?uncap_first}:list" class="layui-input" lay-verify="required">
		      </td>
		  	  <td class="t_lable">链接：</td>
		      <td class="t_content">
		      	<input type="text" name="url" value="/${table.javaName?uncap_first}/list.htm" class="layui-input" lay-verify="required">
		      </td>
		      
		  	</tr>
		  	<tr>
		  	<td class="t_lable">排序</td>
		      <td class="t_content">
		      	<input type="text" name="sort" value="" class="layui-input" lay-verify="required">
		      </td>
		  	  <td class="t_lable">是否展示：</td>
		  	  <td class="t_content">
		      	<div class="layui-input-block">
			      <input type="radio" name="showflag" value="1" title="是" checked>
				  <input type="radio" name="showflag" value="0" title="否">
			    </div>
			   </td>
		  	</tr>
		  </tbody>
		</table>
		<hr>
		<button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="*" style="float: right">
			<i class="layui-icon">&#xe618;</i>保存
		</button>
		<br>
		<br>
		<br>
		</form>
	</div>
</div>
<script type="text/javascript">
	layui.form.render();
	layui.form.on('submit(*)', function(formData) {
		postData("/developer/generator/saveMenu.json");
		return false;
	});
	
	function selectParentMenu(){
		openLayer('/developer/generator/selectParentMenu.htm', '选择父级菜单','30%','80%');
	}
	
	function selectIcon(id){
		openLayer('/base/sysmenu/selectIcon.htm?id='+id, '选择图标');
	}
</script>

</body>
</html>